<div id="content">
    	<div id="conteiner">
        	<div id="left">
            	<div id="leftCont">
                    <div class="frameCont">
                        <div style="background-image: none;" class="pointerBlock dashBordBlock">
                            <div class="content">
                            	<strong class="title">ИНФО</strong>
                                <table cellspacing="0" cellpadding="0" border="0" style="margin-top: 30px;" class="communityInfoTable">
                                <tbody>
                                	<tr><td  class="l"></td><td class="r"><%= flash[:notice] if flash[:notice]%></td></tr>
                                	<% if admin? %>
                                		<tr><td  class="l"></td><td class="r">
                                		<div id="edit_admin"><%= render :partial => "edit_admin"%></div></td></tr>
                                	<% end %>
                                  <tr>
                                    <td class="l">Действие:</td>
                                    <td style="color: rgb(244, 128, 0);" class="r">
																		<% if logged_in?%>                                    	
																			<% if current_user == @user %> 
                                    		| <strong><%= link_to "Сделать новую запись", new_user_post_path(@user)%></strong>
                                    		| <strong>	<%= link_to "Изменить инфо", edit_user_path(@user)%></strong> 
                                    		| <strong><%= link_to "Создать коммюнити", new_community_path %></strong>
                                    		| <strong><%= link_to "Редактировать записи", editall_user_path(@user)%></strong>
																			<% else %>
																				<strong id="add_friend">
																					<% if current_user.is_friends_or_pending_with? @user%>
																							Друг
																					<% else %>
																						<%= link_to_remote "Добавить в друзья", :update => "add_friend", :url => { :controller=>"friends", :action => "request_friendship", :friend_id => @user.id } %>
																					<% end %>
																				</strong>
																			 | <strong> <%= link_to "Лента", events_path(:user_id=>@user.id)%> </strong>
                                    	<% end %>
																		<% end %></td>
                                </tr>
                                <tr>
                                    <td class="l">Пользователь:</td>
                                    <td class="r"><strong style="font-size:15px;"><%= link_to @user.login, user_posts_path(@user), :class=>@user.user_css %></strong>
                                    	<p style="font-size: 16px;"><%= @user.status %></p></td>
                                </tr>
                                <%unless @user.name.blank?%>
	                                <tr>
	                                    <td class="l">Имя:</td>
	                                    <td class="r"><%= @user.name %></td>
	                                </tr>
                                <%end%>
                                <%unless @user.url.blank?%>
	                                <tr>
	                                    <td class="l">Сайт:</td>
	                                    <td class="r"><%= link_to @user.url.gsub("http://", ""), @user.url, :target=>"_blank"%></td>
	                                </tr>
                                <%end%>
                                <%unless @user.city_name.blank? || @user.country.blank?%>
	                                <tr>
	                                    <td class="l">Местоположение:</td>
	                                    <td class="r"><%= @user.city_name + ', ' if @user.city_name%><%= @user.region + ', ' if @user.region%> <%= !@user.country.blank? ? @user.country.name : ""%></td>
	                                </tr>
                                <%end%>
                                <%unless @user.birthday.blank?%>
	                                <tr>
	                                    <td class="l">Дата рождения:</td>
	                                    <td class="r"><%= @user.birthday.to_s(:long)%></td>
	                                </tr>
	                            <%end%>
	                            <%unless @user.icq.blank?%>
	                                <tr>
	                                    <td class="l">Номер ICQ:</td>
	                                    <td class="r"><%= @user.icq%></td>
	                                </tr>
                                <%end%>
                                <%unless @user.description.blank?%>
	                                <tr>
	                                    <td class="l">О себе:</td>
	                                    <td class="r"><%= @user.description.gsub("\n", "<br/>")%></td>
	                                </tr>
                                <%end%>
                                <tr>
                                    <td class="l">Избранное:</td>
                                    <td class="r"><%= link_to "#{@user.features.size} #{Russian.p(@user.features.size, 'запись', 'записи', 'записей')}", user_features_path(@user)%></td>
                                </tr>
                                <tr>
                <td class="l"><a href="#">Интересы:</a></td>
                <td class="r">
                	<strong><%= @user.tag_list.size%>:</strong> 
                	 <% @user.tag_list.each_with_index do |tag, i| %>
                        	<%= link_to tag, tag_users_path(:id=>tag) %><%= ',' unless i == @user.tag_list.size - 1%>
                     <% end %>
                </td>
              </tr>
              
              <tr>
                <td class="l"><a href="#">Друзья:</a></td>
                <td class="r"><img src="/images/ico_user_gray.gif"/> 
									<% friends = (@user.pending_friends_by_me + @user.friends).uniq%>
									<strong><%= friends.size%>:</strong> 
                	<% friends.each_with_index do |friend, i|%>
                		<%= link_to friend.login, user_path(friend)%><%= ',' unless i == friends.size - 1%>
                	<%end%>
                </td>
              </tr>
              <tr>
                <td class="l">Взаимные друзья:</td>
                <td class="r"><img src="/images/ico_user_gray.gif"/> 
									<strong><%= @user.friends.size %>:</strong> 
                	<% @user.friends.each_with_index do |friend, i| %>
                		<%= link_to friend.login, user_path(friend)%><%= ',' unless i == @user.friends.size - 1%>
                	<% end %>
                </td>
              </tr>
              <tr>
                <td class="l">Также в друзьях у:</td>
                <td class="r"><img src="/images/ico_user_gray.gif"/> 
									<strong><%= @user.pending_friends_for_me.count%>:</strong> 
                	<%@user.pending_friends_for_me.each_with_index do |friend, i|%>
                		<%= link_to friend.login, user_path(friend)%><%= ',' unless i == @user.pending_friends_for_me.count - 1%>
                	<%end%>
                </td>
              </tr>
              <tr>
                <td class="l">Состоит в:</td>
                <td class="r"><img src="/images/ico_community.gif"/> <a href="#"><strong>
                	<%= @user.communities.count%>:</strong></a> 
                	<% @user.communities.each_with_index do |community, i| %>
                		<%= link_to community.title, community_path(community)%><%= ',' unless i == @user.communities.count - 1%>
                	<% end %>
                </td>
              </tr>
              <tr>
                <td class="l"/>
                <td class="r" style="font-size:10px;"><%= "Зарегистрирован #{@user.created_at.strftime("%d.%m.%Y")}"%></td>
              </tr>
                                </tbody></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="right">
        	<div id="rightCont">
            	<div style="width: 370px; float: right;">
                    <div class="dashBordBlock">
                        <div style="padding: 50px 42px 20px 0px; text-align: right;" class="content">
                            <%= avatar(@user)%><br/>
                            <%#= link_to "все картинки", user_avatars_path(@user)%>
                            <%= link_to "все картинки", edit_user_avatar_path(@user, 1) if logged_in? && (current_user == @user || current_user.admin? ) %>
                      </div>
                    </div>
                    <div class="pointerBlock dashBordBlock">
                        <div class="content">
                            <%= image_tag 'banner_3.gif', :class=> "dashBord" %>
                        </div>
                    </div>
                </div>
             </div>
        </div>
    </div>
